package org.acmwustl.bubble.logic;

import org.acmwustl.bubble.util.PriceToString;

/**
 *
 * @author officer
 */
public class Item {

    String name;
    int priceInCents;

    public Item(String n, int p) {
        name = n;
        priceInCents = p;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPriceInCents() {
        return priceInCents;
    }

    public void setPriceInCents(int priceInCents) {
        this.priceInCents = priceInCents;
    }

    public String getPriceAsString(){
        return PriceToString.getPriceAsString(priceInCents);
    }

    public String toString() {
        return name + " at " + getPriceAsString() + " per item.";
    }
}
